package controller.startup
{
	import controller.SearchItemCommand;
	import controller.main.LoadFirstDataCommand;
	import controller.monster.BackToLMonsterListViewCommand;
	import controller.monster.CancelOperateMonsterVideoDataCommand;
	import controller.monster.EnsureAddMonsterVideoDataCommand;
	import controller.monster.EnsureEditMonsterVideoDataCommand;
	import controller.monster.ReadSelectedLMonsterCommand;
	import controller.monster.StartAddLMonsterVideoDataCommand;
	import controller.monster.StartDeleteMonsterVideoDataCommand;
	import controller.monster.StartEditLMonsterVideoDataCommand;
	import controller.weapon.GetBugStickDetailCommand;
	import controller.weapon.GetChargeAxeDetailCommand;
	import controller.weapon.GetDoubleSwordDetailCommand;
	import controller.weapon.GetFluteDetailCommand;
	import controller.weapon.GetGreatSwordDetailCommand;
	import controller.weapon.GetGunLanceDetailCommand;
	import controller.weapon.GetHammerDetailCommand;
	import controller.weapon.GetLanceDetailCommand;
	import controller.weapon.GetLightBowGunDetailCommand;
	import controller.weapon.GetLongSwordDetailCommand;
	import controller.weapon.GetShortSwordDetailCommand;
	import controller.weapon.GetSlashAxeDetailCommand;
	import controller.weapon.ShowFluteMelodyCommand;
	
	import org.robotlegs.mvcs.StarlingCommand;
	
	import view.event.ItemEvent;
	import view.event.main.ApplicationEvent;
	import view.event.main.LoadViewEvent;
	import view.event.monster.LMVideoEditViewEvent;
	import view.event.monster.LMVideoListViewEvent;
	import view.event.monster.LMonsterDetailViewEvent;
	import view.event.monster.LMonsterVideoListItemEvent;
	import view.event.monster.TypeListViewEvent;
	import view.event.weapon.bug_stick.BugStickListViewEvent;
	import view.event.weapon.charge_axe.ChargeAxeListViewEvent;
	import view.event.weapon.double_sword.DoubleSwordListViewEvent;
	import view.event.weapon.flute.FluteDetailViewEvent;
	import view.event.weapon.flute.FluteListViewEvent;
	import view.event.weapon.great_sword.GreatSwordListViewEvent;
	import view.event.weapon.gun_lance.GunLanceListViewEvent;
	import view.event.weapon.hammer.HammerListViewEvent;
	import view.event.weapon.lance.LanceListViewEvent;
	import view.event.weapon.light_bow_gun.LightBowGunListViewEvent;
	import view.event.weapon.long_sword.LongSwordListViewEvent;
	import view.event.weapon.short_sword.ShortSwordListViewEvent;
	import view.event.weapon.slash_axe.SlashAxeListViewEvent;
	
	
	/**
	 * 注册相关Controller
	 * @author £iang
	 * 
	 */	
	public class ConfigControllerCommand extends StarlingCommand
	{
		//-----------------------------
		// variables
		//-----------------------------
		
		//-----------------------------
		// properties
		//-----------------------------
		
		//-----------------------------
		// setter&getter
		//-----------------------------
		
		//-----------------------------
		// methods
		//-----------------------------
		
		/**
		 * 执行函数 
		 * 
		 */		
		override public function execute():void 
		{
			commandMap.mapEvent( LoadViewEvent.START_LOAD, LoadFirstDataCommand );
			
			commandMap.mapEvent( LMonsterDetailViewEvent.BACK_TO_LIST, BackToLMonsterListViewCommand );
			commandMap.mapEvent( TypeListViewEvent.READ_SELECT_LDETAIL, ReadSelectedLMonsterCommand );
			commandMap.mapEvent( LMonsterVideoListItemEvent.START_EDIT, StartEditLMonsterVideoDataCommand );
			commandMap.mapEvent( LMonsterVideoListItemEvent.START_DELETE, StartDeleteMonsterVideoDataCommand );
			commandMap.mapEvent( LMVideoEditViewEvent.CANCEL, CancelOperateMonsterVideoDataCommand );
			commandMap.mapEvent( LMVideoEditViewEvent.ENSURE_EDIT, EnsureEditMonsterVideoDataCommand );
			commandMap.mapEvent( LMVideoEditViewEvent.ENSURE_ADD, EnsureAddMonsterVideoDataCommand );
			commandMap.mapEvent( LMVideoListViewEvent.START_ADD, StartAddLMonsterVideoDataCommand );
			
			commandMap.mapEvent( ItemEvent.SEARCH_ITEM, SearchItemCommand );
			
			commandMap.mapEvent( GreatSwordListViewEvent.GET_DETAIL, GetGreatSwordDetailCommand );
			commandMap.mapEvent( LongSwordListViewEvent.GET_DETAIL, GetLongSwordDetailCommand );
			commandMap.mapEvent( ShortSwordListViewEvent.GET_DETAIL, GetShortSwordDetailCommand );
			commandMap.mapEvent( DoubleSwordListViewEvent.GET_DETAIL, GetDoubleSwordDetailCommand );
			commandMap.mapEvent( HammerListViewEvent.GET_DETAIL, GetHammerDetailCommand );
			commandMap.mapEvent( FluteListViewEvent.GET_DETAIL, GetFluteDetailCommand );
			commandMap.mapEvent( FluteDetailViewEvent.SHOW_MELODY, ShowFluteMelodyCommand );
			commandMap.mapEvent( LanceListViewEvent.GET_DETAIL, GetLanceDetailCommand );
			commandMap.mapEvent( GunLanceListViewEvent.GET_DETAIL, GetGunLanceDetailCommand );
			commandMap.mapEvent( SlashAxeListViewEvent.GET_DETAIL, GetSlashAxeDetailCommand );
			commandMap.mapEvent( ChargeAxeListViewEvent.GET_DETAIL, GetChargeAxeDetailCommand );
			commandMap.mapEvent( BugStickListViewEvent.GET_DETAIL, GetBugStickDetailCommand );
			commandMap.mapEvent( LightBowGunListViewEvent.GET_DETAIL, GetLightBowGunDetailCommand );
			
			dispatch( new ApplicationEvent( ApplicationEvent.CONFIG_SERVICE ) );
		}
		
		//-----------------------------
		// events
		//-----------------------------
		
		//-----------------------------
		// dispose
		//-----------------------------
		
	}
}